import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;

public class PerformanceView extends JFrame {

	private JFrame frame;
	private JTable productPerf;
	private JScrollPane scrollpane;
	private JPanel panel;


	String[] columnNames = {"Product Name", "Quantity Sold"};
	Object[][] data = {
			{"2T", "876"},
			{"Advance", "236"},
			{"Helix", "213"},
			{"Rimula", "145"},
			};

	public PerformanceView() {


	}

	public void PerformanceView() {


		frame = new JFrame("Product Performance Report");
        frame.setSize(450, 350);
        frame.setVisible(true);
		frame.setResizable(true);

		setLayout(new FlowLayout());

		productPerf = new JTable(data, columnNames);
		productPerf.setBounds(75, 200, 400, 50);
		productPerf.setFont(new Font("Arial", Font.BOLD, 20));
		productPerf.setFillsViewportHeight(true);


		scrollpane = new JScrollPane(productPerf);
		scrollpane.setBounds(75, 200, 400, 40);

		panel= new JPanel(null);

		panel.add(productPerf);
		panel.add(scrollpane);
		}

public static void main(String[] ars) {

    PerformanceView p = new PerformanceView();
    p.PerformanceView();

}

}


		